package com.domcer.ultra.menu.application.loader;

import acl.AclManager;
import application.loader.ConfigLoader;

import java.io.File;

/**
 * @Author hang.wang
 * @Date 2025/1/30 22:16
 */
public class ConfigExtensionLoader extends ConfigLoader {

    /**
     * why this class had override <br>
     * because of {@link ConfigLoader} is in 'UltraCore' module <br>
     * core module will just create plugin main folder <br>
     * so that want to use custom folder and load data
     */
    @Override
    public void execute0() {
        super.execute0();
        this.createMenuFolder();
    }

    @SuppressWarnings("all")
    private void createMenuFolder() {
        File pluginFolder = AclManager.JAVA_PLUGIN.getDataFolder();
        File functionsFolder = new File(pluginFolder, "menu");

        if (!functionsFolder.exists()) {
            functionsFolder.mkdirs();
        }
    }
}
